package com.qufadai.framework.common.utils.json.serializer;

import java.util.Date;

import com.qufadai.framework.common.utils.json.JsonStringSymbol;
import com.qufadai.framework.common.utils.json.Serializer;
import com.qufadai.framework.common.utils.json.support.JsonStringWriter;
import com.qufadai.framework.common.utils.time.SafeSimpleDateFormat;

public class DateSerializer implements Serializer {

	@Override
	public void convertTo(JsonStringWriter writer, Object obj) {
		writer.write(JsonStringSymbol.QUOTE + SafeSimpleDateFormat.defaultDateFormat.format((Date) obj) + JsonStringSymbol.QUOTE);
	}

}
